import request from '@/utils/request'


export default {
  getAllconditions() {
    return request({
      url: '/workflow/getAllconditions',
      method: 'get',
    })
  },
  getAllUserSelectors() {
    return request({
      url: '/workflow/getAllUserSelectors',
      method: 'get',
    })
  },
  getAllWorkflows() {
    return request({
      url: '/workflow/getAllWorkflows',
      method: 'get',
    })
  },
 
  getUserSelectionsOfUserSelector(params) {
    return request({
      url: '/workflow/getUserSelectionsOfUserSelector' ,
      method: 'get',
      params:params
    })
  },
  createWorkFlow(data) {
    return request({
      url: '/workflow/createWorkFlow',
      method: 'post',
      data
    })
  },
  getAllWorkflowVersions(params) {
    return request({
      url: '/workflow/getAllWorkflowVersions' ,
      method: 'get',
      params:params
    })
  },
  getWorkflowVersion(params) {
    return request({
      url: '/workflow/getWorkflowVersion' ,
      method: 'get',
      params:params
    })
  },
  updateWorkflowActiveVersion(data) {
    return request({
      url: '/workflow/updateWorkflowActiveVersion',
      method: 'put',
      data
    })
  },
  updateWorkflow(data) {
    return request({
      url: '/workflow/updateWorkFlow',
      method: 'put',
      data
    })
  },
  createWorkTask(data) {
    return request({
      url: '/workflow/createWorkTask',
      method: 'post',
      data
    })
  },
  startWorkTask(data) {
    return request({
      url: '/workflow/startWorkTask',
      method: 'post',
      data
    })
  },
  passProve(data) {
    return request({
      url: '/workflow/passProve',
      method: 'post',
      data
    })
  },
  rejectProve(data) {
    return request({
      url: '/workflow/rejectProve',
      method: 'post',
      data
    })
  },
  withdrawProve(data) {
    return request({
      url: '/workflow/withdrawProve',
      method: 'post',
      data
    })
  },
  forwardProve(data) {
    return request({
      url: '/workflow/forwardProve',
      method: 'post',
      data
    })
  },

  getAllTaskStepsOfWorkTask(params) {
    return request({
      url: '/workflow/getAllTaskStepsOfWorkTask' ,
      method: 'get',
      params:params
    })
  },
  clearSimulationRecord() {
    return request({
      url: '/workflow/clearSimulationRecord',
      method: 'post',
    })
  },
}

